package com.bwhx.eruler.service.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.Staff;
import com.bwhx.eruler.dao.StaffDao;
import com.bwhx.eruler.service.StaffService;

/**
 * @Description:
 */
@Service
public class StaffServiceImpl implements StaffService {
	@Autowired 
	StaffDao staffDao;

	//带条件查询
	public List<Staff> find(Staff staff) {
		return staffDao.find(staff);
	}

	
	public Staff get(Serializable id) {
		return staffDao.get(id);
	}

	
	public void insert(Staff staff) {
		staffDao.insert(staff);
		
	}

	
	public void update(Staff staff) {
		staffDao.update(staff);
		
	}

	
	public void delete(Serializable id) {

		staffDao.delete(id);
		
	}

	
	public void delete(Serializable[] ids) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public List<Staff> findByName(String staffname) {
		
		return staffDao.findByName(staffname);
	}


	@Override
	public int insertSN() {
		// TODO Auto-generated method stub
		return staffDao.insertSN();
	}


	@Override
	public void inputStaff(Staff s) {
		staffDao.inputStaff(s);		
	}


	@Override
	public List<Staff> list(Page p) {
		return staffDao.list(p);
	}


	@Override
	public Integer count(Staff s) {
		return staffDao.count(s);

	}


	@Override
	public Staff login(String username, String pwd) {
		return staffDao.login(username,pwd);
	}


	@Override
	public List<Staff> listAll() {
		return staffDao.listAll();
	}


	@Override
	public Staff findByLoginName(String loginName) {
		return staffDao.findByLoginName(loginName);
	}


	@Override
	public void updatestaffAuthorization(HashMap<String, Object> paramMap) {
		staffDao.updatestaffAuthorization(paramMap);
	}


	@Override
	public void del(String sId) {
		staffDao.del(sId);
	}


	@Override
	public void changePwd(Staff staff) {
		staffDao.changePwd(staff);

	}


	@Override
	public void changePwdByPhone(Staff staff) {
		staffDao.changePwdByPhone(staff);
	}


	@Override
	public Staff findByPhone(String getsPhone) {
 		return staffDao.findByPhone(getsPhone);
	}


	@Override
	public String getName(String uploaderID) {
 		return staffDao.getName(uploaderID);
	}

}
